package com.example.springbootdemo;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author brianxia
 * @version 1.0
 * @date 2022-11-11 11:11
 */
//让配置属性类生效，将其放到spring容器中
@EnableConfigurationProperties(TestProperty.class)
public class TestConfig {

    @Bean
    public Result result(TestProperty testProperty){
        System.out.println(testProperty);
        return new Result();
    }
}
